//
//  NSString+getStringSize.m
//  My_WeiBo
//
//  Created by Jay_Apple on 15/5/6.
//  Copyright (c) 2015年 Jay_Apple. All rights reserved.
//

#import "NSString+getStringSize.h"

@implementation NSString (getStringSize)
/**
 *  传入字符串获得文字尺寸
 *
 *  @param String  字符
 *  @param font    字符字体
 *  @param Maxsize 文字最大尺寸
 *
 *  @return 文字尺寸
 */

-(CGSize)getStringSizewithStringsFont:(UIFont *)font andMaxszie:(CGSize)Maxsize
{
    
    NSDictionary *text = @{NSFontAttributeName : font};
    return [self boundingRectWithSize:Maxsize options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:text context:nil].size;

}


@end
